<extend name="Base/common"/>
<block name="style">
    <style type="text/css">
        .register-box {
            float: none;
            margin: 6% auto;
        }
        .breadcrumb{
            margin-bottom: 0px;
            font-size: 18px;
        }
        </style>
</block>
<block name="header">
    <div class="container">
        <ul class="breadcrumb">
            <li>
                <a href="{:U('Index/index')}">首页</a>
            </li>
            <li>
                <a href="{:U('Index/register')}">在线报名</a>
            </li>
        </ul>
    </div>
</block>

<block name="body">
    <div class="container">
        <div class="col-xs-12 col-sm-8 register-box">
            <div class="col-md-offset-2" style="margin-bottom: 8px;">
                <div class="btn-group" role="group" aria-label="...">
                    <button type="button" class="btn btn-default">
                        <span class="glyphicon glyphicon-user" style="margin-right: 5px;"></span>用户注册<span class="glyphicon glyphicon-chevron-right" style="padding-left: 5px;"></span>
                    </button>
                    <if condition="$setup eq 1">
                        <button type="button" class="btn btn-primary">
                            <else/>
                            <button type="button" class="btn btn-default">
                    </if>
                    <span class="glyphicon glyphicon-edit" style="margin-right: 5px;"></span>完善用户资料<span class="glyphicon glyphicon-chevron-right" style="padding-left: 5px;"></span>
                    </button>
                    <if condition="$setup eq 2">
                        <button type="button" class="btn btn-primary">
                            <else/>
                            <button type="button" class="btn btn-default">
                    </if>
                    <span class="glyphicon glyphicon-usd" style="padding-right: 5px;"></span>报名缴费<span class="glyphicon glyphicon-chevron-right" style="padding-left: 5px;"></span>
                    </button>
                    <if condition="$setup eq 3">
                        <button type="button" class="btn btn-primary">
                            <else/>
                            <button type="button" class="btn btn-default">
                    </if>
                    <span class="glyphicon glyphicon-education" style="padding-right: 5px;"></span>排班学习
                    </button>
                </div>
            </div>

            <div class="panel panel-default">
                <h3 class="text-center">{$meta['title']}</h3>
                <if condition="$setup eq 1">
                    <div class="panel-body">
                        <form class="form reg1-modal" action="{:U('Index/baoming')}" method="post">
                            <fieldset>
                                <div class="form-group">
                                    <label class="item-label">姓名<span class="check-tips"></span></label>
                                    <div class="control">
                                        <input type="text" class="form-control" placeholder="姓名" name="realname">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">电话<span class="check-tips"></span></label>
                                    <div class="control">
                                        <input type="text" class="form-control" placeholder="请输入联系电话" name="mobile" value="{$mobile}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">身份证号码<span class="check-tips"></span></label>
                                    <div class="control">
                                        <input type="text" class="form-control" placeholder="请输入身份证号码" name="idcard_no">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">学院<span class="check-tips"></span></label>
                                    <div class="control">
                                        <select name="university" class="form-control select">
                                            <option value="" selected="">请选择：</option>
                                            <option value="北京理工大学珠海校区">北京理工大学珠海校区</option>
                                            <option value="北京师范大学珠海校区">北京师范大学珠海校区</option>
                                            <option value="中山大学珠海校区">中山大学珠海校区</option>
                                            <option value="其它">其它</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">专业<span class="check-tips"></span></label>
                                    <div class="control">
                                        <input type="text" class="form-control" placeholder="请输入专业" name="subject">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">年级<span class="check-tips"></span></label>
                                    <div class="control">
                                        <select name="grade" class="form-control select">
                                            <option value="">请选择：</option>
                                            <option value="大一">大一</option>
                                            <option value="大二">大二</option>
                                            <option value="大三">大三</option>
                                            <option value="大四">大四</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <input type="hidden" name="uid" value="{$uid}" />
                                    <input type="hidden" name="reg_way" value="iic.cn" />
                                    <input type="hidden" name="reg_way_type" value="web" />
                                    <button type="submit" class="btn btn-primary btn-block ajax-post submit" target-form="reg1-modal" data-loading-text="提交表单...">
                                        提交表单
                                    </button>
                                </div>
                            </fieldset>
                        </form>
                    </div>
                </if>

                <if condition="$setup eq 2">
                    <div class="panel-body">
                        <form id="huarongpay" action="https://www.rongyf.com/user/HC0001.tran" method="post" target="_blank">
                            <fieldset>
                                <div class="form-group">
                                    <label class="item-label">姓名:<span class="check-tips">{$bm['realname']}</span></label>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">电话:<span class="check-tips">{$bm['mobile']}</span></label>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">身份证号码:<span class="check-tips">{$bm['idcard_no']}</span></label>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">学院:<span class="check-tips">{$bm['university']}</span></label>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">专业:<span class="check-tips">{$bm['subject']}</span></label>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">年级:<span class="check-tips">{$bm['grade']}</span></label>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">报名课程:<span class="check-tips">{$paid['title']}</span></label>
                                </div>
                                <div class="form-group">
                                    <label class="item-label">费用:<span class="check-tips">￥500.00元</span></label>
                                </div>
                                <input type="hidden" name="paid_id" value="{$paid['id']}">
                                <input type="hidden" name="Merno" value="{$Merno}">
                                <input type="hidden" name="Signtype" value="{$Signtype}">
                                <input type="hidden" name="Prdordno" value="{$Prdordno}">
                                <input type="hidden" name="bizType" value="{$bizType}">
                                <input type="hidden" name="Prdordnam" value="{$Prdordnam}">
                                <input type="hidden" name="Ordamt" value="{$Ordamt}">
                                <input type="hidden" name="Orddate" value="{$Orddate}">
                                <input type="hidden" name="TranType" value="{$TranType}">
                                <input type="hidden" name="Paytype" value="{$Paytype}">
                                <div class="form-group">
                                    <label class="item-label">选择支付银行<span class="check-tips"></span></label>
                                    <div class="control">
                                        <select name="bankCode" class="form-control select">
                                            <option value="">请选择支付银行</option>
                                            <option value="ICBC">中国工商银行</option>
                                            <option value="ABC">中国农业银行</option>
                                            <option value="CCB">中国建设银行</option>
                                            <option value="BOC">中国银行</option>
                                            <option value="CCB">建设银行</option>
                                            <option value="CMB">招商银行</option>
                                            <option value="SPDB">浦发银行</option>
                                            <option value="GDB">广发银行</option>
                                            <option value="BCM">交通银行</option>
                                            <option value="PSBC">邮政储蓄银行</option>
                                            <option value="CITIC">中信银行</option>
                                            <option value="CMBC">民生银行</option>
                                            <option value="CEB">光大银行</option>
                                            <option value="HXB">华夏银行</option>
                                            <option value="CIB">兴业银行</option>
                                            <option value="SHB">上海银行</option>
                                            <option value="SRCB">上海农商</option>
                                            <option value="SPA">平安银行</option>
                                            <option value="BCCB">北京银行</option>
                                            <option value="UnionPay">中国银联</option>
                                            <option value="CZ">浙商银行</option>
                                            <option value="HZB">杭州银行</option>
                                            <option value="CBHB">渤海银行</option>
                                            <option value="NBCB">宁波银行</option>
                                            <option value="BJRCB">北京农村商业银行</option>
                                            <option value="HKSH">香港上海汇丰银行有限公司</option>
                                        </select>
                                    </div>
                                </div>
                                <input type="hidden" name="custnam" value="{$custnam}">
                                <input type="hidden" name="custmob" value="{$custmob}">
                                <input type="hidden" name="custmail" value="{$custmail}">
                                <input type="hidden" name="custcardno" value="{$custcardno}">
                                <input type="hidden" name="Return_url" value="{$Return_url}">
                                <input type="hidden" name="Notify_url" value="{$Notify_url}">
                                <input type="hidden" name="inMsg" value="{$inMsg}">
                                <input type="hidden" name="ThirdParty" value="{$ThirdParty}">
                                <div class="form-group">
                                    <button type="submit" class="btn btn-primary btn-block submit paysubmit">
                                        提交表单
                                    </button>
                                </div>
                            </fieldset>
                        </form>
                    </div>
                    <div style="display: none;" id="paymsg">
                        <p>
                        <a href="#">重新选择支付方式</a><br>
                        <a href="#">已经完成在线支付，查看我的付款情况</a><br>
                        </p>
                    </div>
                    <div style="display: none;" id="nopaymsg">
                        <p>
                            在线支付暂未开通，11月10日前将开发此功能。此前缴费请联系我们的工作人员 0756-6854006，谢谢。
                        </p>
                    </div>
                    <script src="__JS__/iic.js?v={:date('His')}"></script>
                    <script>
                        $(function() {
                            $('.paysubmit').click(function() {
                                var bankCode = $("select[name='bankCode']").find("option:selected").val();
                                if (bankCode == '') {
                                    opendialog('请选择支付银行', 'bankCodemodal', '提示', '');
                                    $('#huarongpay').submit(function() {
                                        return false;
                                    });
                                }else{
                                    var queryString = $('#huarongpay').serialize();
                                    var data = {
                                        'orderno' : $("input[name='Prdordno']").val(),
                                        'str' : queryString,
                                        'type' : 'huarong',
                                        'paid_id' : $("input[name='paid_id']").val(),
                                    };
                                    $.ajax({
                                        url:'{:U("Index/paid")}',
                                        type:'POST',
                                        dataType:'json',
                                        data:data,
                                        cache: false,
                                        success:function(data) {
                                            if (data.statusCode == 200) {
                                                opendialog($('#nopaymsg').html(), 'paymodal', '提示', '',{'backdrop': 'static'});
                                                $('#huarongpay').submit(function() {
                                                    return false;
                                                });
                                            } else {
                                                $('#huarongpay').submit(function() {
                                                    return false;
                                                });
                                            }
                                        }
                                    });//ajax
                                }//if bankCode
                            });//click
                        });
                    </script>
                </if>

            </div>
        </div>
        <div class="col-xs-12 col-sm-4 hidden">
            <!-- 侧边导航 -->
            <div class="panel-group margin-none" role="tablist">
                <a href="#" class="btn btn-primary btn-block" data-toggle="modal" data-target="#baoming-modal" style="margin-bottom: 5px;">意向咨询</a>
                    <div class="panel panel-default margin-none border-radius-none border-bottom-none">
                        <div class="panel-heading" role="tab">
                            <h4 class="panel-title"><a data-toggle="collapse" href="#side-menu{$key}">{$vo.title}</a></h4>
                        </div>
                        <div id="side-menu{$key}" class="panel-collapse collapse in" role="tabpanel">
                            <div class="list-group">
                                <volist name="vo._child" id="vo_child">
                                    <a class="list-group-item border-radius-none <if condition='$vo_child.id eq $__CURRENT_CATEGORY__'>active</if>" href="{:U('Document/index', array('cid' => $vo_child['id']))}">{$vo_child.title}</a>
                                </volist>
                            </div>
                        </div>
                    </div>
            </div>

            <!-- 页面侧边栏钩子 -->
            <div class="clearfix hook hook-page-side">
                {:hook('PageSide')}
            </div>
        </div>

    </div>
    </div>
</block>
